#ifndef CONN_H
#define CONN_H
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QMutex>
#include <qDebug>
#include <iostream>
#include <string>

using namespace std;

class Conn
{
private:
//    static Conn Unique;
public:
    Conn()
    {
        qDebug() << "Creating Connection Class";
        QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
        db.setDatabaseName("thoughts.db");
        if (!db.open()) {
                qDebug() << "Error - database did not open";
    }


//        qDebug() << "We've opened the database";
    }

    int Reset()
    {

        return 1;
    }

//    Conn(QString DataBase)
//    {
//        qDebug() << "Constructor using DataBase " << DataBase;
//        QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
//        db.setDatabaseName(DataBase);
//        if (!db.open()) {
//                qDebug() << "Error - database did not open";
//        }

//        qDebug() << "We've opened the database";
//    }


};

#endif // CONN_H
